package com.cjq.es.controller;

import com.cjq.common.domain.request.InviteQueryReq;
import com.cjq.common.domain.response.InviteQueryRes;
import com.cjq.common.result.PageResult;
import com.cjq.common.result.Result;
import com.cjq.es.service.EsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/es")
public class ESController {
    @Autowired
    private EsService esService;

    /**
     * 查询
     * @param inviteQueryReq
     * @return
     */
    @PostMapping("/search")
    public Result<PageResult<InviteQueryRes>> list(@RequestBody InviteQueryReq inviteQueryReq){
        Result<PageResult<InviteQueryRes>> result = esService.list(inviteQueryReq);
        return result;
    }

}
